home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / AppleShare IP 6.3 SDK / ASIP Registry / Headers / AppleShareMailServerRegistry.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-01  |  4.5 KB  |  153 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        AppleShareMailServerRegistry.h
  3.  
  4.      Contains:    Attributes stored by the ASIP Mail Server in the Registry.
  5.  
  6.      Version:    Technology:    AppleShare IP 6.0
  7.                  Release:    ASIP 6.2 SDK - Saturday, September 4, 1999 15:05:49
  8.  
  9.      Copyright:    © 1996-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __APPLESHAREMAILSERVERREGISTRY__
  18. #define __APPLESHAREMAILSERVERREGISTRY__
  19.  
  20. #ifndef __APPLESHAREREGISTRY__
  21. #include <AppleShareRegistry.h>
  22. #endif
  23.  
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. /*
  48.    *********
  49.    Constants
  50.    *********
  51. */
  52. /* Signature, type...*/
  53. enum {
  54.     kMUMailServerSignature        = FOUR_CHAR_CODE('mail'),
  55.     kMU60Attributes                = FOUR_CHAR_CODE('mU60'),        /* MailUser    6.0*/
  56.     kMUHomeServer                = FOUR_CHAR_CODE('mUhs')        /* Home server record*/
  57. };
  58.  
  59. enum {
  60.     kMUHomeServerTag            = FOUR_CHAR_CODE('Acct')
  61. };
  62.  
  63. /* ASDSharedAttributeConstants */
  64. enum {
  65.     kMUMaxSMTPForwardLength        = 255,
  66.     kMUFingerprintLength        = 16
  67. };
  68.  
  69. /*
  70.    ***************
  71.    User Attributes
  72.    ***************
  73. */
  74.  
  75. /* ASDMailUserFlags*/
  76. enum {
  77.     KMUUserEnableMask            = 0x0000000F,
  78.     kMUAPOPRequired                = 0x00000004,                    /* User must use APOP to authenticate*/
  79.     kMUForwardingMask            = 0x000000F0,                    /* Mask to get forwarding options*/
  80.     kMUNoForwarding                = 0x00000010,                    /* enabled mail...this bit should be set..*/
  81.     kMUForwardSMTP                = 0x00000020,                    /* Forward mail to SMTP address*/
  82.     kMUForwardATalk                = 0x00000040,                    /* Forward mail to AppleTalk SMTP server*/
  83.                                                                 /* 6.0 flag additions*/
  84.     kMUIMAPPOPFlagsMask            = 0x00000F00,
  85.     kMUPOPEnabled                = 0x00000100,                    /* User can connect over POP3 or PASS*/
  86.     kMUIMAPEnabled                = 0x00000200,                    /* User can connect over IMAP or PASS*/
  87.     kMUNotificationMask            = 0x0000F000,
  88.     kMUNotificationON            = 0x00001000,                    /* User wants mail notification*/
  89.     kMUUseLastIPAddr            = 0x00002000,                    /* Use last IP Address for notification - notifyIPAddress is ignored..*/
  90.     kMUUseSpecificIPAddr        = 0x00004000,                    /* field notifyIPAddress is used...and kMUUseLastIPAddr should cleared..*/
  91.     kMUSharedBoxFlagMask        = 0x000F0000,
  92.     kMUSeparatePOPAndIMAP        = 0x00010000,                    /* User can connect over POP3, IMAP or PASS with separate inbox*/
  93.     kMUShowPOPInIMAP            = 0x00020000,                    /* User can connect over POP3, IMAP or PASS with separate inbox*/
  94.                                                                 /* legacy, do not use beyond 5.0.x versions..*/
  95.     kMUMailEnabled                = 0x00000001,                    /* Was kMEEnabled in version 1 - ignore, should be zero for 6.0..*/
  96.     kMULoginEnabled                = 0x00000002                    /* User can connect over POP3 or PASS  - ignore, should be zero for 6.0..*/
  97. };
  98.  
  99. /* Only generate C struct info, since the ASM and Pascal will be wrong*/
  100. /*
  101.     Note: The MU5xAttributes and MU60Attributes structs must not be altered.
  102.     The shipping code in earlier versions of our products reads and writes 
  103.     precisely these structures and any changes to the struct size or field offsets 
  104.     will destroy backwards compatibility with the older products.
  105.     In other words don't use Str32Field as the atalk field types or you'll break things!
  106. */
  107. typedef unsigned char                     ATalkStr33[33];
  108. /*
  109.    A 32 character Pascal string with a length byte.
  110.    Yes, when packed things end up on odd addresses, but that's where the old code requires it to be.
  111. */
  112.  
  113. struct MU60Attributes {
  114.     UInt32                             version;
  115.     UInt32                             mailUserFlags;
  116.     ATalkStr33                         atalkForwardName;
  117.     ATalkStr33                         atalkForwardServer;
  118.     ATalkStr33                         atalkForwardZone;
  119.     char                             smtpForward[256];
  120.     char                             fingerprint[16];            /* initialize to all zeros when creating attribute*/
  121.     UInt32                             notifyIPAddress;
  122. };
  123. typedef struct MU60Attributes            MU60Attributes;
  124.  
  125. struct MUHomeServer {
  126.     UInt32                             tag;                        /* kMUHomeServerTag*/
  127.     UInt32                             offset;                        /* Unused set to 0*/
  128.     Str255                             data;                        /* home server name, as a pascal string*/
  129.     Str255                             reserved;                    /* set to 0*/
  130. };
  131. typedef struct MUHomeServer                MUHomeServer;
  132.  
  133. #if PRAGMA_STRUCT_ALIGN
  134.     #pragma options align=reset
  135. #elif PRAGMA_STRUCT_PACKPUSH
  136.     #pragma pack(pop)
  137. #elif PRAGMA_STRUCT_PACK
  138.     #pragma pack()
  139. #endif
  140.  
  141. #ifdef PRAGMA_IMPORT_OFF
  142. #pragma import off
  143. #elif PRAGMA_IMPORT
  144. #pragma import reset
  145. #endif
  146.  
  147. #ifdef __cplusplus
  148. }
  149. #endif
  150.  
  151. #endif /* __APPLESHAREMAILSERVERREGISTRY__ */
  152.  
  153.